<?php
/**
 * Classe base per i controllers
 *
 * @author luigi.pastore
 * @created  4-mag-2011
 */
class Classes_Core_Controller
{

    public function __construct()
    {
	$this->application = Classes_Core_Application::getInstance();
	$this->layout = $this->application->layout;
    }
    
    public function __call( $name, $arguments )
    {
	// Richiama il metodo di Classes_Application
	if( method_exists( $this->application, $name ) )
	    return $this->application->$name( $arguments[0] );
	
	throw new Exception( 'Metodo ' . $name . ' non Supportato' );
    }
    
//    public function __get( $name )
//    {
//	if(  property_exists( $this->application, $name ))
//	{
//	    return $this->application->$name;
//	}
//	else
//	    exit('errore');
//    }
    
}

